package test1202;

import com.qf.bean.Menu;
import com.qf.bean.Role;
import com.qf.bean.Wife;
import com.qf.service.ManyToManyService;
import com.qf.service.WifeService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * 2019/12/2
 * Administrator
 * springdata1130
 * 面向对象面向君  不负代码不负卿
 */
public class Demo3 {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("springData.xml");
        WifeService service=(WifeService) applicationContext.getBean("wservice");

        Wife wife = service.findbyid(1);
        System.out.println(wife.getWifeName()+","+wife.getHusband().getHusname());
    }
}
